<template>
    <div :class="[ isLogin ? 'l-footer' : 'b-footer' ]">
        <div class="b-footer-content" :class="{'top-border':isLine}">
            <div class=" fl" :class="[ isMain ? 'content-middle' : 'content-left' ]">
                <a v-if="!isMain" :href="icpInfo.ICPaddress?icpInfo.ICPaddress:'javascript:void(0)'" target="_black"><img class="b_institution fl" src="./../../../static/images/b_institution.png" alt="事业单位"></a>
                <p class="detail " :class="{'content-middle':isMain}">
                  <template v-if="icpInfo.ICPName">
                    机构名称：{{icpInfo.ICPName}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  </template>
                  <template v-if="icpInfo.address">
                    地址：{{icpInfo.address}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  </template>
                  <template v-if="icpInfo.phoneNum">
                    电话：{{icpInfo.phoneNum}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  </template>
                  技术支持：广东修炼科技股份有限公司
                  <br> Copyright&nbsp;©&nbsp;2017&nbsp;xiulian &nbsp;Technology&nbsp;All&nbsp;rights&nbsp;reserved&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;粤ICP备09018140号</p>
            </div>
            <div v-if="!isMain" class="content-right fr">
                <p class="phone-number">400-801-9131</p>
                <p class="data fr">周一至周五 9:00-18:00</p>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    props: {
        isMain: {
            type: Boolean,
            default: false,
        },
        isLine: { // 是否是Main模块里的首页
            type: Boolean,
            default: true,
        },
        isLogin: {
            type: Boolean,
            default: true,
        }
    },
    data() {
        return {
            icpInfo: {
                ICPCode: '',
                ICPName: '',
                ICPaddress: '',
                address: '',
                phoneNum: '',
            }
        }
    },
    created() { this.init() },
    methods: {
        init() {
            let account = this.$utils.Storage.getObj('B_ACCOUNT');
            if (account && account.icpInfo) {
                this.icpInfo = account.icpInfo;
            }
        }
    }
}
</script>

<style lang="less">
.b-footer {
  height: @footer-height;
  width: 100%;
  padding: 0 20px;
}
.l-footer {
  justify-content: flex-end;
  width: 100%;
  max-width: @min-width;
  margin: auto;
}
.b-footer-content {
  height: 120px;
  &.top-border {
    box-shadow: 0px -1px 0px 0px @color-Border;
  }
  .content-left {
    float: left;
    width: 1000px;
  }
  .b_institution {
    margin: 35px 15px 0 0;
  }
  .detail {
    height: 34px;
    color: @color-Content;
    font-size: 12px;
    line-height: 17px;
    margin-top: 43px;
    color: #737680;
  }
  .content-middle {
    width: 100%;
    text-align: center;
  }
  .content-right {
    margin-top: 37px;
    float: right;
    .phone-number {
      color: #007cef;
      font-size: 24px;
    }
    .data {
      color: @color-Content;
      font-size: 12px;
      line-height: 17px;
    }
  }
}
</style>

